home *** CD-ROM | disk | FTP | other *** search
Wrap
/* graphics: toolbox interfaces by Cary Clark, Georgiann Delaney, Herb Derby, Michael Fairman, Pablo Fernicola, Dave Good, Josh Horwich, Barton House, Robert Johnson, Keith McGreggor, Mike Reed, Oliver Steele, David Van Brink, Chris Yerga Copyright 1987 - 1994 Apple Computer, Inc. All rights reserved. */ #pragma once #ifndef graphicsToolboxIncludes #define graphicsToolboxIncludes #ifndef __WINDOWS__ #include <Windows.h> #endif #ifndef fontTypesIncludes #include "font types.h" #endif #ifndef graphicsTypesIncludes #include "graphics types.h" #endif #ifndef graphicsLinkageIncludes #include "graphics linkage.h" #endif /* QD to QD GX Translator typedefs */ enum gxTranslationOptions { gxDefaultOptionsTranslation = 0x0000, gxOptimizedTranslation = 0x0001, gxReplaceLineWidthTranslation = 0x0002, gxSimpleScalingTranslation = 0x0004, gxSimpleGeometryTranslation = 0x0008, /* implies simple scaling */ gxSimpleLinesTranslation = 0x000C, /* implies simple geometry & scaling */ gxLayoutTextTranslation = 0x0010, /* turn on gxLine layout (normally off) */ gxRasterTargetTranslation = 0x0020, gxPostScriptTargetTranslation = 0x0040, gxVectorTargetTranslation = 0x0080 }; typedef long gxTranslationOption; enum gxTranslationStatistics { gxContainsFormsBegin = 0x0001, gxContainsFormsEnd = 0x0002, gxContainsPostScript = 0x0004, gxContainsEmptyPostScript = 0x0008 }; typedef long gxTranslationStatistic; #define gxQuickDrawPictTag 0x70696374 /* 'pict' */ struct gxQuickDrawPict { /* translator inputs */ gxTranslationOption options; Rect srcRect; Point styleStretch; /* size of quickdraw picture data */ unsigned long dataLength; /* file alias */ struct gxBitmapDataSourceAlias alias; }; #ifndef __cplusplus typedef struct gxQuickDrawPict gxQuickDrawPict; #endif #pragma procname gxShapeSpool typedef OSErr (*gxShapeSpoolProcPtr)(gxShape toSpool, long refCon); typedef gxShapeSpoolProcPtr gxShapeSpoolFunction; /* printing utilities typedef */ #pragma procname gxUserViewPortFilter typedef void (*gxUserViewPortFilterProcPtr)(gxShape toFilter, gxViewPort portOrder, long refCon); typedef gxUserViewPortFilterProcPtr gxUserViewPortFilter; #pragma procname gxConvertQDFont typedef long (*gxConvertQDFontProcPtr)(gxStyle dst, long txFont, long txFace); typedef gxConvertQDFontProcPtr gxConvertQDFontFunction; #ifdef __cplusplus extern "C" { #endif /* WindowRecord utilities */ gxViewPort GXNewWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x236, gxNeedClient|gxNeedHeap|gxNeedStack); gxViewPort GXGetWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x237, gxNeedClient|gxNeedHeap|gxNeedStack); WindowPtr GXGetViewPortWindow(gxViewPort portOrder) GXInlineCode(0x238, gxNeedClient|gxNeedHeap|gxNeedStack); /* GDevice utilities */ GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice) GXInlineCode(0x239, gxNeedClient|gxNeedHeap|gxNeedStack); gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice) GXInlineCode(0x23a, gxNeedClient|gxNeedHeap|gxNeedStack); /* gxPoint utilities */ void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt) GXInlineCode(0x23b, gxNeedClient|gxNeedHeap|gxNeedStack); /* mouse utilities */ void GXGetGlobalMouse(gxPoint *globalPt) GXInlineCode(0x23c, gxNeedClient|gxNeedHeap|gxNeedStack); /* return mouse location in fixed-gxPoint global space */ void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt) GXInlineCode(0x23d, gxNeedClient|gxNeedHeap|gxNeedStack); /* return fixed-gxPoint local mouse (gxViewPort == 0 --> default) */ /* printing utilities */ gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon) GXInlineCode(0x25e, gxNeedClient|gxNeedHeap|gxNeedStack); void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon) GXInlineCode(0x23e, gxNeedClient|gxNeedHeap|gxNeedStack); /* QD to QD GX Translator functions */ void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolFunction userFunction, void *reference) GXInlineCode(0x23f, gxNeedClient|gxNeedHeap|gxNeedStack); gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic) GXInlineCode(0x240, gxNeedClient|gxNeedHeap|gxNeedStack); gxShape GXConvertPICTToShape(const PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats) GXInlineCode(0x241, gxNeedClient|gxNeedHeap|gxNeedStack); /* Find the best GX style given a QD font and face. Called by the QD->GX translator */ long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace) GXInlineCode(0x242, gxNeedClient|gxNeedHeap|gxNeedStack); gxConvertQDFontProcPtr GXGetConvertQDFont(void) GXInlineCode(0x243, gxAnyContext); void GXSetConvertQDFont(gxConvertQDFontProcPtr userFunction) GXInlineCode(0x244, gxAnyContext); #ifdef __cplusplus } #endif #endif